<?php include('../resources/views/header.blade.php'); ?>

<style type="text/css">
    .hot_question_item {
        padding-top: 12px !important ;
        padding-bottom: 12px !important ;
    }
    .hot_question_item_pic {
        padding:0px !important;
    }
    .hot_question_title {
        display: inline-block ;
        max-width: 80% ;
        color: #333333 ;
        font-size: 18px ;
        margin-left: 6px ;
        white-space: nowrap !important ;
        overflow: hidden ;
        text-overflow: ellipsis ;
    }
</style>


<section class="" style="margin-bottom:100px;">
    <?php
        if( isset($hot_results) ){
            foreach($hot_results as $key => $val){
                echo '    <a href="/detail/'.$val->id.'">';
                if( $val->cover != '' ){
                    echo '<div class="item hot_question_item_pic">';
                    echo '  <div style="width:100%;height:80px;background:url('.$val->cover.') no-repeat center;background-size:cover;">';
                    echo '  </div>';
                    echo '  <div style="padding:12px !important;">';
                }else{
                    echo '<div class="item hot_question_item">';
                }
                echo '        <span class="hot_question_title">'.$val->title.'</span>';
                echo '        <div class="header-box" style="float:right;width:24px;height:24px;">';
                echo '            <img class="header" style="width:24px;height:24px;" src="http://source.timepicker.cn/'.$val->icon.'">';
                echo '        </div>';
                echo '        <p style="clear:both;margin-top:3px;padding-left:6px;margin-bottom:4px;">';
                echo '            '.$val->description;
                echo '        </p>';
                echo '        <span style="font-color:#58bdfd;margin-left:6px;font-size:12px;">'.$val->name.'</span>';
                echo '        <span class="right" style="font-color:#58bdfd;font-size:13px;">';
                if( isset($attention_check[$val->id]) ){
                    echo '            <img src="images/iconfont_heart.png" attention=1 style="width:13px;height:13px;" />'.$val->temp_count;
                }else{
                    echo '            <img src="images/iconfont_heart_grey.png" attention=2 style="width:13px;height:13px;" />'.$val->temp_count;
                }
                echo '        </span>';
                echo '    </div>';
                if( $val->cover != '' ){
                    echo '</div>';
                }
                echo '</a>';
            }
        }
    ?>
</section>

<!--提问-->
<div class="clearfix bottom" style="border:0px;width:auto;bottom:60px;position:fixed;right:0px;">
    <a href="/question">
        <div class="right" style="width:60px;height:60px;border-radius:60px;background-color:#58bdfd;border:1px solid #ddd;margin-right:16px;">
            <img class="header right" src="images/new_question.png" style="border-radius:60px;width:24px;height:24px;margin-top:16px;margin-right:16px;" />
        </div>
    </a>
</div>

<!--导航-->
<nav class="clearfix fixed bottom">
    <ul style="width:100%;">
        <li style="width:50%;text-align:center;"><a href="#" class="current">热门</a></li>
        <li style="width:50%;text-align:center;"><a href="/topics" >所有</a></li>
    </ul>
</nav>

<?php include('../resources/views/footer.blade.php'); ?>

<script type="text/javascript">

    function isRootPage(){
        return true;
    }

</script>
